(function(){"use strict";BX.namespace("BX.Landing.History.Action");var n=BX.Landing.Utils.scrollTo;var e=BX.Landing.Utils.highlight;BX.Landing.History.Action.addBlock=function(t,r){return BX.Landing.PageObject.getInstance().blocks().then(function(c){var i=c.get(r[t].currentBlock);return new Promise(function(t){if(i){i.forceInit();return n(i.node).then(e.bind(null,i.node,false,true)).then(t)}else{t()}}).then(function(){var n=BX.Landing.Main.getInstance();n.currentBlock=i;return BX.Landing.PageObject.getInstance().view().then(function(e){n.currentArea=e.contentDocument.body.querySelector('[data-landing="'+r[t].lid+'"]');return n.onAddBlock(r[t].code,r.block,true)})})})}})();